package com.yxlgateway.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yxlcommon.common.pojo.Category;
import com.yxlcommon.common.pojo.RespBean;
import com.yxlcommon.common.pojo.WorksInfo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


public interface WorksInfoService extends IService<WorksInfo> {

    RespBean newWorksInfo();

    RespBean hotWorksInfo();

    RespBean userWorksInfo(Integer userId);

    RespBean<IPage<WorksInfo>> getWorksInfoByPage(Long currentPage, Long size, WorksInfo worksInfo);

    RespBean<WorksInfo> selectWorkInfoById(Long workId);

    RespBean selectWorkByKeyword(String keyword, String type);

    RespBean<List<WorksInfo>> selectWorksInfoByCategory(Category category, String type);

    RespBean<Integer> updateWorkById(WorksInfo worksInfo);

    RespBean<Integer> deleteWorkById(WorksInfo worksInfo);

    RespBean uploadFile(MultipartFile file, MultipartFile poster, WorksInfo worksInfo) throws Exception;

    RespBean<List<WorksInfo>> selectAllWorks();
}
